package com.shirodemo.service;

import com.shirodemo.pojo.User;

import java.util.Set;

/**
 * Created by 追风少年
 *
 * @email doubihah@foxmail.com
 * @create 2017/12/13 11:40
 **/
public interface UserService {

    /**
     * 创建用户
     * @param user
     * @return
     */
    void createUser(User user);
    public void changePassword(String userId, String newPassword);//修改密码
    public void correlationRoles(String userId, String... roleIds); //添加用户-角色关系
    public void uncorrelationRoles(String userId, String... roleIds);// 移除用户-角色关系
    public User findByUsername(String username);// 根据用户名查找用户
    public Set<String> findRoles(String username);// 根据用户名查找其角色
    public Set<String> findPermissions(String username); //根据用户名查找其权限

}
